﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Fraktalysator.Controls
{
	partial class UpdateInfoDisplay : UserControl
	{
		string link;
		public UpdateInfoDisplay()
		{
			InitializeComponent();
			this.lLink.LinkClicked +=lLink_LinkClicked;
		}

		void lLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
 			System.Diagnostics.Process.Start(this.link);
		}

		public UpdateInfo UpdateInfo
		{
			set
			{
				this.lName.Text = value.Name;
				this.lBuild.Text = value.Build.ToString();
				this.link = value.Link;
				StringBuilder sBuilder = new StringBuilder(value.Description.Length);
				foreach (string d in value.Description)
				{
					sBuilder.AppendLine(d);
				}
				this.lDescription.Text = sBuilder.ToString();
			}
		}
	}
}
